<div class="dashboard-editor-header">
	<div class="dashboard-editor-title">
		<i class="icon icon-th-list"></i>
		Row settings
	</div>

	<div ng-model="editor.index" bs-tabs style="text-transform:capitalize;">
		<div ng-repeat="tab in ['General','Panels']" data-title="{{tab}}">
		</div>
	</div>

</div>

<div class="dashboard-editor-body">

	<div class="editor-row" ng-if="editor.index == 0">
		<div class="editor-option">
			<label class="small">Title</label><input type="text"
													 class="input-medium"
													 ng-model='row.title'></input>
		</div>
		<div class="editor-option">
			<label class="small">Height</label><input type="text"
													  class="input-mini"
													  ng-model='row.height'></input>
		</div>
		<editor-opt-bool text="Editable" model="row.editable"></editor-opt-bool>
		<editor-opt-bool text="Show title"
						 model="row.showTitle"></editor-opt-bool>
	</div>
	<div class="row-fluid" ng-if="editor.index == 1">
		<div class="span12">
			<table class="grafana-options-table"
				   style="max-width: 400px; width: auto">
				<thead>
				<th>Title</th>
				<th>Type</th>
				<th>Span</span></th>
				<th></th>
				<th></th>
				<th></th>
				</thead>
				<tr ng-repeat="panel in row.panels">
					<td style="width: 95%">{{panel.title}}</td>
					<td>{{panel.type}}</td>
					<td><select ng-hide="panel.sizeable == false"
								class="input-mini" style="margin-bottom: 0;"
								ng-model="panel.span"
								ng-options="size for size in [1,2,3,4,5,6,7,8,9,10,11,12]"></select>
					</td>
					<td><i ng-click="_.move(row.panels,$index,$index-1)"
						   ng-hide="$first" class="pointer icon-arrow-up"></i>
					</td>
					<td><i ng-click="_.move(row.panels,$index,$index+1)"
						   ng-hide="$last" class="pointer icon-arrow-down"></i>
					</td>
					<td>
						<a ng-click="row.panels = _.without(row.panels,panel)"
						   class="btn btn-danger btn-mini">
							<i class="icon-remove"></i>
						</a>
					</td>
				</tr>
			</table>
		</div>
	</div>
</div>

<div class="dashboard-editor-footer">
	<button type="button" class="btn btn-success pull-right"
			ng-click="editor.index=0;dismiss();reset_panel();close_edit()">Close
	</button>
</div>
